/* 接口和路径的配置项 
 * @ 劳兆城 
 * @ 2017-08-30*/

import { getLocalStorage } from 'common/js/dom';
import { userStorageName } from 'common/js/config';

//后台数据地址
//export const httpUrl = 'http://121.201.43.239:9000/Console';
//export const httpUrl = 'http://10.168.80.182:8080/Console';
export const httpUrl = '/Console';

//后台数据返回成功标识
export const ERR_OK = 1;

//登录超时
export const ERR_TIMEOUT = 601;

//自定义 数据返回错误标识
export const ERR_CUSTOM = '2000';

//js访问 static 文件夹路径
export const Static = 'static';

//访问后台传的token值
export function options() {
	return {
		headers: {
			crsfToken: getLocalStorage(userStorageName).token
		},
		withCredentials: true
	}
}